<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var d = ''
        var a = +prompt(`乘法表从几开始，请输入数字`), b = +prompt(`乘法表执行到几，请输入数字`)
        var e = b + 1 - a
        for (var i = 1; i <= e; i++) {
            for (var j = 1; j <= a; j++) {
                var c = a * j
                c = c < 10 ? '0' + c : c;
                d = d + `${j}x${a}=${c}  `
            }
            d = d + `\n`
            a++
            b++
        }
        alert(d)
        console.log(d);
    </script>
</body>

</html>